Skip to content

ENT-14320: Wrapped most of the remaining cf-remote/cfbs commands into CFEngine-cli - #209

Merged
larsewi merged 10 commits into
cfengine:mainfrom
SimonThalvorsen:ENT-14320
Aug 10, 2026
Merged

ENT-14320: Wrapped most of the remaining cf-remote/cfbs commands into CFEngine-cli#209
larsewi merged 10 commits into
cfengine:mainfrom
SimonThalvorsen:ENT-14320

Conversation

@SimonThalvorsen

Copy link
Copy Markdown
Contributor

No description provided.

@SimonThalvorsen
SimonThalvorsen marked this pull request as draft August 7, 2026 14:42
@SimonThalvorsen
SimonThalvorsen marked this pull request as ready for review August 7, 2026 15:06
@cf-bottom

Copy link
Copy Markdown

Thanks for submitting a PR! Maybe @larsewi can review this?

description="A wrapper around the cf-remote `build`-function with some added niceties",
)
sp.add_argument(
"--non-interactive",

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Isn't the whole point with CFEngine CLI that it should not be used in scripts? I feel options like --non-interactive kind of works against that. Do we already have these options for other sub commands?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not for most commands, only init and for build/deploy. I added them as niceties when testing a module, that way I could just do cfengine build --host HOST --non-interactive and wait for output rather than pressing enter every 5 seconds.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We could consider

parser = argparse.ArgumentParser(prog='frobble')
parser.add_argument('--foo', help=argparse.SUPPRESS)
parser.print_help()

for arguments that are only for our tests.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I meant testing as in using. They way it would work without is that you would build, prompt if you want to deploy, then prompt if you want to run. But when working on a module/policy-set you would probably want to just fast-forward this and read the output after the full pipeline.

Comment thread src/cfengine_cli/cfengine_wrapper/cfengine_commands.py Outdated
Comment thread src/cfengine_cli/cfengine_wrapper/cfengine_commands.py
Comment thread src/cfengine_cli/cfengine_wrapper/arg_parse.py Outdated
Comment thread src/cfengine_cli/cfengine_wrapper/cfengine_commands.py Outdated
Comment thread src/cfengine_cli/main.py
Comment thread src/cfengine_cli/cfengine_wrapper/cfengine_utils.py
@larsewi
larsewi merged commit 3498b64 into cfengine:main Aug 10, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

3 participants